package com.corticon.dialogs.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


/**
 * @author Yanglifan
 */
@Entity
@Table(name = "quote")
public class Quote extends AuditableEntity implements Serializable {

    private Long quoteId;
    private Dialog dialog;
    private RiskRating riskRating;
    private LoanType loanType;
    private LoanProduct loanProduct;
    private Boolean discElig;
    private Long grossIncome;
    private Long livExp;
    private Long loanIntRate;
    private Boolean manualUwFlag;
    private Long netIncPct;
    private Long netIncScore;
    private Long otherAmt;
    private Long supportAmt;
    private Long totalIncome;

    // Constructors
    /**
     * default constructor
     */
    public Quote() {
    }

    // Property accessors
    @Id
    @SequenceGenerator(name = "quote_id_seq",
            sequenceName = "quote_id_seq",
            allocationSize = 1, initialValue = 1)
    // Set allocationSize and initialValue
    // to let sequence increment following DB.
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "quote_id_seq")
    @Column(name = "quote_id",  nullable = false, columnDefinition = "integer")
    public Long getQuoteId() {
        return this.quoteId;
    }

    public void setQuoteId(Long quoteId) {
        this.quoteId = quoteId;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "dinstassoc_q_dinst_id_oid")
    public Dialog getDialog() {
        return dialog;
    }

    public void setDialog(Dialog dialog) {
        this.dialog = dialog;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "rrassoc_rr_id_oid")
    public RiskRating getRiskRating() {
        return this.riskRating;
    }

    public void setRiskRating(RiskRating riskRating) {
        this.riskRating = riskRating;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "loanTypeAssoc_loantype_id_oid")
    public LoanType getLoanType() {
        return this.loanType;
    }

    public void setLoanType(LoanType loanType) {
        this.loanType = loanType;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "loanprodassoc_loanprod_id_oid")
    public LoanProduct getLoanProduct() {
        return this.loanProduct;
    }

    public void setLoanProduct(LoanProduct loanProduct) {
        this.loanProduct = loanProduct;
    }

    @Column(name = "disc_elig")
    public Boolean getDiscElig() {
        return this.discElig;
    }

    public void setDiscElig(Boolean discElig) {
        this.discElig = discElig;
    }

    @Column(name = "gross_income")
    public Long getGrossIncome() {
        return this.grossIncome;
    }

    public void setGrossIncome(Long grossIncome) {
        this.grossIncome = grossIncome;
    }

    @Column(name = "liv_exp")
    public Long getLivExp() {
        return this.livExp;
    }

    public void setLivExp(Long livExp) {
        this.livExp = livExp;
    }

    @Column(name = "loan_int_rate", columnDefinition = "numeric")
    public Long getLoanIntRate() {
        return this.loanIntRate;
    }

    public void setLoanIntRate(Long loanIntRate) {
        this.loanIntRate = loanIntRate;
    }

    @Column(name = "manual_uw_flag")
    public Boolean getManualUwFlag() {
        return this.manualUwFlag;
    }

    public void setManualUwFlag(Boolean manualUwFlag) {
        this.manualUwFlag = manualUwFlag;
    }

    @Column(name = "net_inc_pct", columnDefinition = "numeric")
    public Long getNetIncPct() {
        return this.netIncPct;
    }

    public void setNetIncPct(Long netIncPct) {
        this.netIncPct = netIncPct;
    }

    @Column(name = "net_inc_score")
    public Long getNetIncScore() {
        return this.netIncScore;
    }

    public void setNetIncScore(Long netIncScore) {
        this.netIncScore = netIncScore;
    }

    @Column(name = "other_amt")
    public Long getOtherAmt() {
        return this.otherAmt;
    }

    public void setOtherAmt(Long otherAmt) {
        this.otherAmt = otherAmt;
    }

    @Column(name = "support_amt")
    public Long getSupportAmt() {
        return this.supportAmt;
    }

    public void setSupportAmt(Long supportAmt) {
        this.supportAmt = supportAmt;
    }

    @Column(name = "total_income")
    public Long getTotalIncome() {
        return this.totalIncome;
    }

    public void setTotalIncome(Long totalIncome) {
        this.totalIncome = totalIncome;
    }
}